cmake_minimum_required(VERSION 3.10.2)
project(Logging)
find_package(Threads REQUIRED)
set(CMAKE_CXX_STANDARD 11)
# set(THREADS_PREFER_PTHREAD_FLAG ON)
add_definitions("-Wall -g")

file(GLOB_RECURSE datatime_srcs ../datetime/src/*.cpp)
file(GLOB_RECURSE logger_srcs ../logging/src/*.cpp)

file(GLOB_RECURSE utils_srcs  ../base/*.cpp)
file(GLOB_RECURSE thread_srcs  ../thread/src/*.cpp)

add_executable(logging Logging_test.cpp ${datatime_srcs} ${logger_srcs} ${utils_srcs} ${thread_srcs})
target_link_libraries(logging ${CMAKE_THREAD_LIBS_INIT})

add_executable(log Logging_test2.cpp  ${datatime_srcs} ${logger_srcs} ${utils_srcs} ${thread_srcs})
target_link_libraries(log ${CMAKE_THREAD_LIBS_INIT})